package com.huidu.bitrade.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Data
@ApiModel("otc商家变现")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OtcBusinessRealization {
    @Id
    @ApiModelProperty("id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty("用户id")
    private Long memberId;

    @ApiModelProperty("变现金额")
    private BigDecimal amount;

    @ApiModelProperty("状态0.待审核1.审核成功2.审核成功,等待承兑3.失败")
    private Integer status;

    @ApiModelProperty("支付凭证（图片地址）")
    private String image;

    @ApiModelProperty("支付方式 1支付宝 2微信 3银行卡")
    private Integer payType;

    @ApiModelProperty(hidden = true)
    private String payInfo;

    @ApiModelProperty("拒绝原因")
    private String reason;

    @CreationTimestamp
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @UpdateTimestamp
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;//审核时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;//承兑成功时间




}
